package cn.wolfcode.web.controller;

import cn.wolfcode.Service.IUserService;
import cn.wolfcode.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
    private IUserService userService;
 // http:localhost:8090/user/13088889999
@GetMapping("/{id}")
    public User findById(@PathVariable("id") Long id){
    // User user = userMapper.selectByid(id);
    //  System.out.println(user.toString());
    return  userService.findById(id);

}

}
